export function chatGPTParseText( parsed ){    
    const d = parsed.choices[0].delta ? parsed.choices[0].delta : parsed.choices[0]
    let s = d && d.text ? d.text : (d?.content)
    if( parsed.choices[0]?.finish_reason === 'stop' ){
        s = ""
    }
    return s
}

export function isStopParse( parsed ){
    return parsed.choices[0]?.finish_reason === 'stop'
}